home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 043 (1989-06)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 043 (1989-06)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / zc / zc.readme < prev    next >
Text File  |  1989-01-12  |  4KB  |  112 lines

  1.       zc c - compiler
  2.  
  3.        revised by Joe Montgomery dec 1988.
  4.         (monty@brahms.berkeley.edu)
  5.  
  6.  
  7.     This is a modified version of hcc the Sozobon-C compiler by
  8.        Johann Ruegg.  The documentation released with the compiler
  9.        states the following:
  10.  
  11.  
  12.  * Permission is granted to anyone to use this software for any purpose
  13.  * on any computer system, and to redistribute it freely, with the
  14.  * following restrictions:
  15.  * 1) No charge may be made other than reasonable charges for reproduction.
  16.  * 2) Modified versions must be clearly marked as such.
  17.  * 3) The authors are not responsible for any harmful consequences
  18.  *    of using this software, even if they result from defects in it.
  19.  
  20.       I can only add that I can not be held responsible for any
  21.       harmful consequences as well.
  22.  
  23.      I hope that this goes a long way toward the goal of having a
  24.      freely distributable c compiler for the amiga.  I have modified
  25.      hcc so that it generates code compatible with a68k.  I have
  26.      not been able to test this adequately as I do not have the
  27.      amiga.lib.  However I will get it hopefully within a few weeks
  28.      and then begin to do some more checking.  It does seem to
  29.      to generate assembly language files that a68k does not complain
  30.      about.  There are some problems however:
  31.  
  32.     One I don't know Motorola 68000 assem or the directives.
  33.     A68k did not have much documentation so I guessed about
  34.     the use of some.  I used XREF for externally defined labels
  35.     XDEF for global defines, and DC,DS for data storage.  I hope
  36.     my usage is correct. Further a68k requires the SECTIONS DATA
  37.     and BSS to be named so I used DATA & BSS for those names.
  38.     This may be a problem or not. I do know that
  39.     hcc doesn't generate a XREF or public direc for functions
  40.     or variables which are external to the file.  It expects
  41.     the assembler to figure this out. a68k does not like this.
  42.     I tried to remedy both these problems to some extent.
  43.     The code has 0 comments and as I do not have a printer, I
  44.     found it difficult to make any major changes, so I caused
  45.     the compiler to generate a XREF label for every function
  46.     call. Not good, hopefully I can get that working latter.
  47.     For the variables, I was able to get it to generate XREF's
  48.     for externally defined global variables, however external
  49.     variables within a function are not declared to be XREF.
  50.  
  51.     I tried to label most of the changes I made with the
  52.     comment
  53.       /*  JMM ...
  54.  
  55.     The following files were modified:
  56.  
  57.     Revised main.c to use Amiga File System Naming Conventions
  58.        Added ?,C,F,E switches.
  59.                  ? help
  60.                  C force data,bss into Chip memory
  61.                  F force data,bss into Fast memory
  62.                  Exxxx use xxxx as errorfile.
  63.                    writes the number of errors to the
  64.                    file
  65.                  Oxxxx use xxxx as the output file
  66.                    instead of the default file.
  67.  
  68.     Revised out.c to use MOTOROLA assembly directives in order
  69.        to be compatible with C.Gibbs a68k assembler & blink
  70.        Added END statement
  71.        Changed .comm label,size to label DC.x 0
  72.            .even    to CNOP 2,0
  73.            .globl    to XDEF
  74.            .text    to CODE CODE  [CHIP | FAST]
  75.            .data    to DATA DATA  [CHIP | FAST]
  76.            .bss    to BSS BSS
  77.     Revised d2.c so that externs are declared as XREF -----
  78.     Revised g2.c & gen.c to declare all called functions XREF
  79.       (will need to change this to declare only external functions)
  80.  
  81.  
  82.      I also wrote a front end called zcc that automatically calls
  83.        a68k if no errors and then blink.
  84.      It is somewhat a unix style front end but I don't know all
  85.        the options available.
  86.  
  87.      for zcc and zc, if you type zcc ? or zc ? it will list the
  88.        various options.(one exception is that zc doesn't list
  89.             -E as an option.)
  90.  
  91.      Again, I hope to correct  the above problems as well as adding
  92.      more options.  One not of caution, zc expects all options
  93.      to be upper case. I did not change this as it uses all the
  94.      lower case options for debug purposes.  Perhaps in the future
  95.      I will change this.
  96.  
  97.      Please let me know of any problems, and I will attempt to fix
  98.      them.
  99.  
  100.  
  101.     Thanks, for all the great PD and FD software out there.  Hope
  102.     you can get some use out of this.
  103.  
  104.              Thanks again,
  105.  
  106.                Joe
  107.  
  108.  
  109.  
  110.  
  111.  
  112.